package com.xunk.equipment.service.yikang.enums;


import com.xunk.common.core.utils.StringUtils;

/**
 * @ProjectName: xunk
 * @Package: com.xunk.equipment.service.yikang.enums
 * @ClassName: RingNotifyEnum
 * @Author: luanzhiwei
 * @Description: 门铃通知类型枚举
 * @Date: 2021/4/2 13:19
 * @Version: 1.0
 */
public enum RingNotifyEnum {

    /**
     * 当有人按门铃时立即触发
     */
    FAST_RING("FastRing", "门铃事件"),

    /**
     * 当有人按门铃时并且门铃图片上传完成触发
     */
    RING("Ring", "门铃图片事件"),

    /**
     * 当有人在门前产生抓拍事件时触发
     */
    PIR_ALARM("PirAlarm", "PIR 移动侦测（抓拍）");

    /**
     * 通知类型
     */
    private String eventType;
    /**
     * 类型描述
     */
    private String eventDesc;

    public String getEventType() {
        return eventType;
    }

    public void setEventType(String eventType) {
        this.eventType = eventType;
    }

    public String getEventDesc() {
        return eventDesc;
    }

    public void setEventDesc(String eventDesc) {
        this.eventDesc = eventDesc;
    }

    public static String getDesc(String eventType){
        for (RingNotifyEnum value : RingNotifyEnum.values()) {
            if (value.getEventType().equals(eventType)){
                return value.getEventDesc();
            }
        }
        return StringUtils.EMPTY;
    }

    RingNotifyEnum(String eventType, String eventDesc) {
        this.eventType = eventType;
        this.eventDesc = eventDesc;
    }

}